package Test;


import commander.CLI;
import core.*;


public class ResetTest {
    public static void main(String[] args){
        try{
            JitInit.init("E:\\study\\java");
            JitAdd.add("test1.txt");
            JitAdd.add("test23");
            JitAdd.add("test23\\file3.txt");
            //JitCommit.commit("第一次提交");
            //System.out.println("\n");

            String firstCommitName = JitCommit.commit("第一次提交"); //我们提交一次，同时获取该提交的commitName，这是第一次的commitName，一会reset回来要用这个名字
            System.out.println("\n");

            JitAdd.add("file4.txt");
            JitCommit.commit("第二次提交");
            System.out.println("\n");

            String[] str1 = {"jit", "reset", "--soft", firstCommitName};
            String[] str2 = {"jit", "reset", "--mixed", firstCommitName};
//            String[] str3 = {"jit", "reset", "--hard", firstCommitName};
            CLI.jitReset(str1);
            CLI.jitReset(str2);
//            CLI.jitReset(str3);


        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
<<<<<<< HEAD
=======

>>>>>>> 86693ae5299cdac0871be1578566d765f59b5e42
